import {useAxios} from '@/hooks/web/useAxios'
import {queryEq} from './types'

const request = useAxios()

//获取设备列表
export const listEq = (params?: queryEq) => {
    return request.get({
        url: '/system/equipment/list',
        params
    })
}

//分配设备
export const adEq = (data) => {
    return request.post({
        url: '/system/equipment/distribution',
        data
    })
}

//获取即将过期和已过期设备
export const expireData = () => {
    return request.get({
        url: '/system/equipment/expireData?equipmentType=TJ01',
    })
}

//获取即将过期和已过期设备
export const getFaultyEquipment = () => {
    return request.get({
        url: '/system/equipment/getFaultyEquipment?equipmentType=TJ01',
    })
}